package other;

import java.util.Scanner;

public class XuanZhuan2 {
    public static void main(String[] args) {

        System.out.println("请输入一个数字");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a[][] = new int[n][n];
        int s =1;
        int r = 0;
        int c = 0;
//        a[r][c] = s;
        while (a[r+1][c]==0&&r+1<=n-1){
            a[++r][c] = ++s;
        }





        //打印
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a.length; j++) {
                System.out.print(a[i][j]);
            }
            System.out.println();
        }

    }
}